public class DJHViewText implements Observer, DJHViewInterface 
{
	private DJHControllerInterface controller;
	private DJHModelInterface model;
	private String title;
	
	public DJHViewText(String title, DJHControllerInterface controller, DJHModelInterface model)
	{
		this.controller = controller;
		this.model = model;
		this.title = title;
		((DJHModel) model).RegisterObserver(this);
	}
	
	public void Initialize()
	{
		System.out.println(title);
	}
	
	public void Update(DJHState state, String msg, String info)
	{
		System.out.println("");
        System.out.println("------------------------------------------------");
		System.out.println("------------------------------------------------");
        System.out.println(msg);
        System.out.println(info);
        System.out.println("------------------------------------------------");
		for(int i=0; i<state.set1.length; i++)
        {
			if(state.set1[i] == 1) System.out.print(i + " ");
            else System.out.print("- ");
        }
		System.out.println();
		for(int i=0; i<state.boat.length-1; i++)
        {
			if(state.boat[i] >= 0) System.out.print(state.boat[i] + " ");
            else System.out.print("- ");
        }
		System.out.println();
		for(int i=0; i<state.set2.length; i++)
        {
			if(state.set2[i] == 1) System.out.print(i + " ");
            else System.out.print("- ");
        }
		System.out.println("");
		System.out.println("------------------------------------------------");
	}
}
